package com.pig4cloud.pigx.shop.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.api.dto.GoodsSpuDTO;
import com.pig4cloud.pigx.shop.api.vo.GoodsSpuVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteGoodsSpuService", value = ServiceNameConstants.SHOP_SERVICE)
public interface RemoteGoodsSpuService {

	/**
	 * 获取简版商品sku信息
	 * @param spuId
	 * @param skuId
	 * @param from
	 * @return
	 */
	@GetMapping("/goods/spu/getSimpleSkuById/{spuId}/{skuId}")
	R<GoodsSpuVO> getSimpleSkuById(@PathVariable("spuId") Long spuId, @PathVariable("skuId") Long skuId,
			@RequestHeader(SecurityConstants.FROM) String from);

}
